 <@h.head title="用户登录 | spinach"/>
<br>
<body class="login">
	<!-- BEGIN LOGO -->

	<div class="logo">

		<img src="${path}/static/image/logo-big.png" alt="" />

	</div>

	<!-- END LOGO -->
	<div class="content">
		<!-- BEGIN LOGIN FORM -->
		<form class="form-vertical login-form" action="${path}/login.json"
			id="fm" method="post">
			<h3 class="form-title">Login to your account</h3>
			<div class="alert alert-error hide">
				<span>请输入用户名或密码.</span>
			</div>
			<div class="control-group">
				<label class="control-label visible-ie8 visible-ie9">用户名</label>
				<div class="controls">
					<div class="input-icon left">
						<i class="icon-user"></i> <input class="m-wrap placeholder-no-fix"
							type="text" placeholder="Username" name="username" value="demo"
							datatype="*" nullmsg="请输入用户名！" /> <span
							class="Validform_checktip"></span>
					</div>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label visible-ie8 visible-ie9">Password</label>
				<div class="controls">
					<div class="input-icon left">
						<i class="icon-lock"></i> <input class="m-wrap placeholder-no-fix"
							type="password" placeholder="Password" name="password"
							value="123456" datatype="*" nullmsg="密码不能为空！" /> <span
							class="Validform_checktip"></span>
					</div>
				</div>
			</div>
			<div class="form-actions">
				<label class="checkbox"> <input type="checkbox"
					name="remember" value="1" /> Remember me
				</label>
				<button type="submit" class="btn green pull-right">
					Login <i class="m-icon-swapright m-icon-white"></i>
				</button>
			</div>
		</form>
		<!-- END LOGIN FORM -->
	</div>
	<@h.foot />
	<script type="text/javascript">
		var callback = function(data) {
			if (data.status == "0") {
				window.location.href = "${path}/index";
			} else {
				$('.alert-error', $('.login-form')).find("span").html(data.msg);
				$('.alert-error', $('.login-form')).show();
			}
		}
		$("#fm").validFrom(callback);
	</script>
	<!-- END JAVASCRIPTS -->
</body>
</html>